package com.gpframework.common.pay.leshua.config;

import lombok.extern.slf4j.Slf4j;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


/**
 * @author eden
 * @date 2018/5/21 下午3:36
 * @desc
 */
@Slf4j
public class LeshuaConfig {

    /**
     * 交易密钥
     */
    public static String key;

    /**
     * 乐刷商户号
     */
    public static String mch_id;

    /**
     * 乐刷请求url
     */
    public static String req_url;

    /**
     * 通知url
     */
    public static String notify_url;

    static {
        Properties prop = new Properties();
        InputStream in = LeshuaConfig.class.getResourceAsStream("/config.properties");
        try {
            prop.load(in);
            key = prop.getProperty("key").trim();
            mch_id = prop.getProperty("mch_id").trim();
            req_url = prop.getProperty("req_url").trim();
            notify_url = prop.getProperty("notify_url").trim();
        } catch (IOException e) {
            log.error(e.getMessage());
        }
    }
}
